A virtual machine monitor, such as a hypervisor, is a program that creates virtual machines, each with virtualized hardware resources which may be backed by underlying physical hardware resources. When directly assigning hardware control interfaces to a virtual machine, the virtual machine is typically given direct control of the hardware via what looks like memory accesses (to registers, on-card RAM, etc.). However, when a virtual machine does not respond in a timely manner to requests to give up the hardware control interface, it may be necessary to eventually remove the hardware control interface from the virtual machine. A problem with this approach is that the device driver in the virtual machine may be in the middle of using the hardware control interface when the interface is removed, and thus the associated driver in the virtual machine may receive unexpected values as it tries to read from memory locations that were previously backed by the hardware. For example, an unexpected loss of the memory access may leave memory locations that now read as 0xFF for every byte. The unexpected values can potentially cause the child driver to crash, loop, or deadlock.
Another problem is that virtual processors can be paused on the boundary between any two instructions, and it is difficult to write and test a driver that handles hardware removal at any such arbitrary instruction boundary. Real physical processors usually operate in a mode in which instructions are executed quickly and without interruption. Thus, other techniques are needed in the art to solve the above described problems.